/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mygame;

import com.jme3.export.InputCapsule;
import com.jme3.export.JmeExporter;
import com.jme3.export.JmeImporter;
import com.jme3.export.OutputCapsule;
import com.jme3.export.Savable;
import java.io.IOException;

/**
 *
 * @author Peter
 */
public class PlayerData implements Savable{
    
    private int maxHP;
    private int maxMP;
    
            
    public void write(JmeExporter ex) throws IOException {
        OutputCapsule capsule = ex.getCapsule(this);
        capsule.write(maxHP,   "maxHPValue",   1);
        capsule.write(maxMP,   "maxMPValue",   1);
    }

    public void read(JmeImporter im) throws IOException {
        InputCapsule capsule = im.getCapsule(this);
        maxHP   = capsule.readInt(    "maxHPValue",   1);
        maxMP   = capsule.readInt(    "maxMPValue",   1);
    }
    
}
